#ifndef _KP_MESSAGE_H_
#define _KP_MESSAGE_H_

#include "kp_macro.h"

enum KPMessageType
{
	KMT_SUCCESS = 0,
	KMT_FAILED,

	KMT_FINISH_CAPTURE,
	
	KMT_OBJECT_TEXTURE,
	KMT_OBJECT_SHADER,
	KMT_OBJECT_PROGRAM,
	
	KMT_GL_GEN_TEXTURES,
	KMT_GL_BIND_TEXTURE,

	KMT_GL_DRAW_ARRAYS,
	
	KMT_NONE
};

struct KPMessage
{
	KPMessageType	m_type;
	int				m_length;
	char*			m_pData;
	
	KPMessage() : m_pData(NULL), m_type(KMT_NONE), m_length(0)
	{
	}
	
	~KPMessage()
	{
		SAFE_DEL_ARRAY(m_pData);
	}
	
	void clearData()
	{
		m_type = KMT_NONE;
		m_length = 0;
		SAFE_DEL_ARRAY(m_pData);
	}
};

#endif
